#simple makefile to create a static library
CC=g++
CFLAGS=-c -s -v
CLIBNAME=libwgetopt.a
INSLIB=/usr/lib/
INSINCLUDE=/usr/include/

all: wgetopt
	@echo creating the static library $(CLIBNAME)
	ar -rvs $(CLIBNAME) wgetopt.o
wgetopt:
	@echo building wgetopt.cpp
	$(CC) $(CFLAGS) wgetopt.cpp
clean:
	@echo cleaning objects and libs
	rm -vI *.a *.o
install:
	@echo installing $(CLIBNAME) to $(INSLIB)
	cp -v $(CLIBNAME) $(INSLIB)
	@echo installing wgetopt.h to $(INSINCLUDE)
	cp -v wgetopt.h $(INSINCLUDE)
remove:
	@echo removing all wgetopt installed files
	rm -v $(INSLIB)$(CLIBNAME)
	rm -v $(INSINCLUDE)wgetopt.h
